package com.yqh.entity;

import cn.hutool.core.annotation.Alias;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.Column;
import javax.persistence.Id;
import java.time.LocalDateTime;

/**
 * 商品实体类
 *
 * @author 阳秋豪
 * @createTime 2024/3/22
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class Product {
    /*
    * @Id   标识主键
    * @Column   属性与数据库字段映射
    * @Alias    属性与 excel 标题映射
    * */
    @Id
    @Column(name = "product_id")
    private Integer productId;

    @Alias("商品分类")
    @Column(name = "product_category_id")
    private Integer productCategoryId;

    @Alias("商品名称")
    private String productName;

    @Alias("商品图片")
    private String productImage;

    @Alias("商品描述")
    private String productDescription;

    @Alias("商品售价")
    @Column(name = "product_price")
    private Double productPrice;

    @Alias("商品状态")
    private String productStatus;

    @Alias("商品库存")
    @Column(name = "product_quantity")
    private Integer productQuantity;

    @Alias("创建时间")
    private LocalDateTime createdTime;

    @Alias("更新时间")
    private LocalDateTime updatedTime;
}
